package com.qfedu.openplateform.manager.controller;

import com.github.pagehelper.PageInfo;
import com.qfedu.openplateform.manager.entity.Log;
import com.qfedu.openplateform.manager.entity.TableData;
import com.qfedu.openplateform.manager.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys/search")
public class LogController {

@Autowired
private LogService logService;

    @RequestMapping( "/table")
    public TableData table(Log log, Integer page, Integer limit) {
        PageInfo<Log> pageInfo = logService.getLogList(log, page, limit);
        return new TableData(pageInfo.getTotal(), pageInfo.getList());
    }
}
